//系统中用到的code数据。
//客户信息
customer = new Array();

function CustomerInfo(id, name, address, phone, taxNo, bank, accountNo) {
    this.id = id;
	this.name = name;
	this.address = address;
	this.phone = phone;
	this.taxNo = taxNo;
	this.bank = bank;
	this.accountNo = accountNo;
}



function prepareCustomerInfo() {
	customer[1] = new CustomerInfo("1","客户A","地址1","电话1","税号1","开户行1","账号1");
	customer[2] = new CustomerInfo("2","客户B","地址2","电话2","税号2","开户行2","账号2");


	$.each(customer, function(i,n){
		if (!$.isEmptyObject(n)) {
			var option = "<option value='" + n.id + "'>" + n.name + "</option>";
			$(option).appendTo($("select[name|=customerName]"));	
		}   
	});

}

function prepareProductInfo() {
	var option = "<option value=' '>-</option>"
		+ "<option value='螺纹钢'>螺纹钢</option>"
		+ "<option value='线材'>线材</option>"
		+ "<option value='冷轧板卷'>冷轧板卷</option>"
		+ "<option value='热轧卷'>热轧卷</option>"
		+ "<option value='开平板'>开平板</option>"
		+ "<option value='带钢'>带钢</option>"
		+ "<option value='硅钢片'>硅钢片</option>"
		+ "<option value='花纹板卷'>花纹板卷</option>"
		+ "<option value='中厚板'>中厚板</option>"
		+ "<option value='锅炉容器'>锅炉容器</option>"
		+ "<option value='船板'>船板</option>"
		+ "<option value='翼缘板'>翼缘板</option>"
		+ "<option value='其它中厚'>其它中厚</option>"
		+ "<option value='圆钢'>圆钢</option>"
		+ "<option value='扁钢'>扁钢</option>"
		+ "<option value='工字钢'>工字钢</option>"
		+ "<option value='角钢'>角钢</option>"
		+ "<option value='槽钢'>槽钢</option>"
		+ "<option value='H型钢'>H型钢</option>"
		+ "<option value='球扁钢'>球扁钢</option>"
		+ "<option value='冷弯型钢'>冷弯型钢</option>"
		+ "<option value='其它型材'>其它型材</option>"
		+ "<option value='镀锌板卷'>镀锌板卷</option>"
		+ "<option value='镀锡板卷'>镀锡板卷</option>"
		+ "<option value='镀铝锌板卷'>镀铝锌</option>"
		+ "<option value='彩涂板卷'>彩涂板卷</option>"
		+ "<option value='其它涂镀板卷'>其它涂镀</option>"
		+ "<option value='无缝钢管'>无缝钢管</option>"
		+ "<option value='焊接钢管'>焊接钢管</option>"
		+ "<option value='镀锌管'>镀锌管</option>"
		+ "<option value='其它钢管'>其它钢管</option>"
		+ "<option value='板坯'>板坯</option>"
		+ "<option value='方坯'>方坯</option>"
		+ "<option value='型材制品'>型材制品</option>"
		+ "<option value='钢轨'>钢轨</option>"
		+ "<option value='其它钢材'>其它钢材</option>"
		+ "<option value='矿石'>矿石</option>"
		+ "<option value='生铁'>生铁</option>"
		+ "<option value='煤焦'>煤焦</option>"
		+ "<option value='废钢'>废钢</option>"
		+ "<option value='铁合金'>铁合金</option>"
		+ "<option value='有色'>有色</option>"
		+ "<option value='其它炉料'>其它炉料</option>"
		+ "<option value='冷镦钢'>冷镦钢</option>"
		+ "<option value='拉丝材'>拉丝材</option>"
		+ "<option value='硬线'>硬线</option>"
		+ "<option value='焊线'>焊线</option>"
		+ "<option value='钢绳'>钢绳</option>"
		+ "<option value='钢丝'>钢丝</option>"
		+ "<option value='碳结钢'>碳结钢</option>"
		+ "<option value='合结钢'>合结钢</option>"
		+ "<option value='齿轮钢'>齿轮钢</option>"
		+ "<option value='铬钼钢'>铬钼钢</option>"
		+ "<option value='工业普圆'>工业普圆</option>"
		+ "<option value='管坯'>管坯</option>"
		+ "<option value='锻材'>锻材</option>"
		+ "<option value='易切钢'>易切钢</option>"
		+ "<option value='模具钢'>模具钢</option>"
		+ "<option value='工具钢'>工具钢</option>"
		+ "<option value='轴承钢'>轴承钢</option>"
		+ "<option value='弹簧钢'>弹簧钢</option>"
		+ "<option value='不锈钢'>不锈钢</option>"
		+ "<option value='其它特钢'>其它特钢</option>"
		+ "<option value='方矩管'>方矩管</option>";

	$("select[name|=productName]").append(
     $(option));
}

function prepareEntrepotInfo() {
	var option = "<option value='1'>仓库地址1</option>"
		+"<option value='2'>仓库地址2</option>";
	$("select[name|=entrepot]").append(
     $(option));
}
